n = int(input())
ans = 0
num = 1
for i in range(1, n + 1):
    num = num * i
    ans += num
print(ans)